//
//  AIMacroCommon.h
//  MiaMind
//
//  Created by Vill on 2023/11/23.
//

#ifndef AIMacroCommon_h
#define AIMacroCommon_h

#import "UIView+Extension.h"
#import "UIColor+Extension.h"
#import "NSString+Extension.h"
#import "AIUIHelperManager.h"
#import "AIAESUtil.h"         //解密
#import "UIFont+Extension.h"  //字体
#import "UITextField+Placeholder.h"
#import "AIUserInfoModel.h"   //用户个人信息
#import "AIUserInfoManager.h"
#import "AINetWorkDefine.h"
#import "AIHttpManager.h"
#import "UIView+Gradient.h"
#import "UIButton+Extension.h"     //按钮ext
#import "UINavigationController+FDFullscreenPopGesture.h"
#import <SVProgressHUD/SVProgressHUD.h>
#import "NSData+Extension.h"  
#import "AICustomMacros.h"
#import "AITopicChatTopModel.h"    //话题模型
#import "MNCacheClass.h"           //存储

#define KAppDelegate (AppDelegate *)[UIApplication sharedApplication].delegate

#define KImaged(str)    [UIImage imageNamed:str]
#define KUrlImage(str)  [NSURL URLWithString:str]

#define KScreenWidth [UIScreen mainScreen].bounds.size.width
#define KScreenHeight [UIScreen mainScreen].bounds.size.height

// 状态栏高度
#define KStatusBarHeight [UIApplication sharedApplication].statusBarFrame.size.height
// 导航栏高度
#define KNavigationBarHeight (KStatusBarHeight + 44)

#define KBottomSafeHeight [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom

#define KTabBarHeight (KBottomSafeHeight + 49)

#define PTW(floatValue) (floatValue * KScreenWidth/375.0)

#define WeakSelf(type)  __weak typeof(type) weak##type = type;

#ifdef DEBUG
#define NSLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define NSLog(...)
#endif

#define KDeviceUUID [HDeviceIdentifier deviceIdentifier]

// baseUrl
#define KBASEURL @"http://8.219.52.157:9605"
//#define KBASEURL @"http://192.168.101.71:9605"      //本地测试

//一些简写
#define NotificationCenter [NSNotificationCenter defaultCenter]
#define NTFAddObj(_name, _sel, _obj) [NotificationCenter addObserver:self selector:_sel name:_name object:_obj]
#define NTFAdd(_name, _sel) NTFAddObj(_name, _sel, nil)
#define NTFPost(_name, _obj) [NotificationCenter postNotificationName:_name object:_obj]

//// 关闭用户设置信息
//#define CloseInfoSetViewNotification  @"InfoSetNotification"

#define kTermsService @"https://www.baidu.com"
#define kPrivacyPolicy @"https://cj.sina.com.cn/articles/view/1798361341/6b30d0fd02001i4z0"

/*******************Socket**************************/
#define TCP_beatBody  @"PING"    //心跳标识
#define TCP_AutoConnectCount  10    //自动重连次数
#define TCP_BeatDuration  300      //心跳频率 5分钟发一次
#define TCP_MaxBeatMissCount   5   //最大心跳丢失数
//#define TCP_Host  @"192.168.101.71"  //地址 @"192.168.101.71" 本地地址
#define TCP_Host  @"8.219.52.157"
#define TCP_Port   19605              //端口



#endif /* AIMacroCommon_h */
